import request from '@/utils/request'
import { praseStrEmpty } from "@/utils/ruoyi";

export default {
  addIssueEveryone(issue){ // 添加issue 2021年8月16日，无权限issue添加
    return request({
      url:'/issues/addIssueEveryone',
      method:'post',
      data:issue
    })
  },

  addIssues(issue){ // 添加issue
    return request({
      url:'/issues/addIssues',
      method:'post',
      data:issue
    })
  },

  getList(issueQuery,current,limit){ // 获取列表
    console.log(issueQuery);
    return request({
      url:`/issues/getList/${current}/${limit}`,
      method:'post',
      data:issueQuery
    })
  },

  getOne(issuesId){
    return request({
      url:`/issues/getOne/${issuesId}`,
      method:'get',
    })
  },

  removeIssues(issuesIds){
    return request({
      url:`/issues/removeIssues/${issuesIds}`,
      method:'delete',
    })
  },

  update(issue){
    return request({
      url:`/issues/update`,
      method:'put',
      data:issue
    })
  }
}
